Dynomotion

Group: DynoMotion Message: 9605 From: baltar.chris Date: 6/2/2014
Subject: JP7 - GPIO Use IO0-IO7 for Step and Direction

Is it possible to use IO0-IO7 for normal step and direction seems like all IOs on JP7 can be used for anything however once I read the documentation it seems they are very specific.


I am just setting up a G540 with the KFLOP like many others and I made a PCB to handle the pass through from parallel to JP7 but now I am thinking I can not do this.


Please clarify:


-Chris

Group: DynoMotion Message: 9608 From: Tom Kerekes Date: 6/3/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
Hi Chris,

No it is not possible to use IO 0-7 for Step and Direction Outputs.  KFLOP has 8 Hardware Step and Direction Generators which are each basically connected to fixed pins.  It would take an excessive amount of FPGA resources to allow them to be multiplexed to any random pins.  There is one option to mux the 4 Step/Dir channels on JP7 to JP4 and JP6.  All the possibilities are listed here:

http://dynomotion.com/Help/StepAndDirection/StepAndDir.htm

In general KFLOP's hardware devices such as Step/Dir Generators, Encoder Quadrature Counters, PWM Generators, and the UART, use fixed pins with possibly an option to select between two choices.  There is the configuration option to make use of any device channel for any axis channel so this provides some degree of flexibility on which connector and pins end up being used for a particular axis. 

Functions that are handled in Software using GPIO (General Purpose Inputs or Outputs) signals such as Limit switches, Home Inputs, Index pulses, EStop, Axis Enables, Spindle Relays, User Buttons and Switches, etc. can use any IO available.  When a hardware device like a Step/Dir Generator is not needed and not enabled its associated pins can be used as GPIO.

HTH
Regards
TK

Group: DynoMotion Message: 9609 From: baltar.chris Date: 6/3/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
Hi Tom,

Thank you very much for the explanation and link.. it makes sense now.. sadly I had the PCB made before asking / double checking... oo well another board for the scrap pile rev2 here i come.

-Chris

Group: DynoMotion Message: 9611 From: Tom Kerekes Date: 6/3/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
Hi Chris,

Ouch!  Sorry it wasn't clear.  We went out of our way to make this confusing.

Good luck
TK


Group: DynoMotion Message: 9614 From: baltar.chris Date: 6/3/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
The more I read the more I realize this is clear as mud.  still a cool product, just need to make the most of it!

Just for the sake of my wallet I have to make the most of the board, I need it to handle all my inputs: probe, separate limit switches that are NC (magnetic), Separate Homing switches NO (inductive), Spindle LED lights (relay), Spindle is being controlled via MACH3 Modbus, 4 axis of motors, however like many my X axis requires two motors X/A slaved, Y, Z and Rotary.

So just to be clear I can not use the I/O0 - I/O7 for anything but Encoder?  
It says Gen Purpose but then again I/O8 - I/O14 also say Gen Purpose and they can only be used for step/dir which my motors require.

I am not trying to mux multiple items on the pins all separate devices to separate pins.  What should I do breakout JP5/JP4/JP6?

-Chris
Group: DynoMotion Message: 9615 From: Tom Kerekes Date: 6/3/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
Hi Chris,

Yes IO 0-7 can be used for GPIO if you don't need to use those as encoder inputs.

All 46 KFLOP IO pins can be used as GPIO.  However if for example a particular device you want to use (ie Step/Dir Generator) is wired to a pair of pins, then you must obviously wire the drive to those pins and those pins will not be available to be used as GPIO.

Let's see, you need:

Each motor needs:
   2 Step/Dir
   2 limits
   1 Home
-------------
5 pins

x 5 motors = 25 pins

That leaves 21 pins left for misc: Spindle, Probe, ??

KFLOP JP7 only has 18 IO total (and only 4 motors worth of Step/Dir) so you will need to use some other connectors.  You will definitely need JP5 for the 5th motor Step/Dir.

HTH
Regards
TK





Group: DynoMotion Message: 9616 From: baltar.chris Date: 6/4/2014
Subject: Re: JP7 - GPIO Use IO0-IO7 for Step and Direction
Tom great news thanks again for your quick and friendly support for such basic questions!

Have a great day.
-Chris